//
//  KSKAHomeTopItem.m
//  DashboardHD
//
//  Created by 楊亜玲 on 17/3/23.
//  Copyright © 2017年 Totyu. All rights reserved.
//

#import "KSKAHomeTopItem.h"

@interface KSKAHomeTopItem ()
@property (weak, nonatomic) IBOutlet UIButton *btn;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end

@implementation KSKAHomeTopItem

+ (instancetype)item{
    return [[[NSBundle mainBundle] loadNibNamed:@"KSKAHomeTopItem" owner:nil options:nil] firstObject];
}

-(void)setTitle:(NSString *)title{
    self.titleLabel.text = title;
}

-(void)setBtnColor:(UIColor *)btnColor{
    [self.btn setBackgroundColor:btnColor];
}

/**
 设置点击的监听器
 
 @param target 监听器
 @param action 监听方法
 */
-(void)addTarget:(id)target action:(SEL)action{
    [self.btn addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
}

@end
